//
//  UpdateGeRenInFoViewController.m
//  DA_V
//
//  Created by 中亿世联前台 on 15/4/24.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "UpdateGeRenInFoViewController.h"
#import "GeRenUpdatePasswordView.h"
#import "InterFace.h"
#import "UIViewAdditions.h"

@interface UpdateGeRenInFoViewController ()<UITextFieldDelegate,UITextViewDelegate>
@property(nonatomic,retain)UITextField *nameTextField;
@property(nonatomic,retain)UITextField *mobileTextField;
@property(nonatomic,retain)UITextView *addressTextView;
@end

@implementation UpdateGeRenInFoViewController
@synthesize nameTextField,mobileTextField,addressTextView;

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBarHidden=YES;
    self.navigationItem.hidesBackButton = YES;
    [self initNav];
    navTitle.text = @"修改信息";
    [self createGeRenView];
    self.view.backgroundColor = [self colorWithHexString:@"#F5F5F5"];
}
-(void)clickBackBtn{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)createGeRenView{
    //    self.geRenView = (GeRenUpdatePasswordView *)[[[NSBundle mainBundle] loadNibNamed:@"GeRen_xibs" owner:self options:nil] objectAtIndex:2];
    //    self.geRenView.frame = CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT-64);
    //    [self.view addSubview:self.geRenView];
    UIView *backgroundView = [[UIView alloc]initWithFrame:CGRectMake(0, navView.bottom, SCREEN_WIDTH, SCREEN_HEIGHT*0.5)];
    backgroundView.backgroundColor = [UIColor whiteColor];
    backgroundView.userInteractionEnabled = YES;
    [self.view addSubview:backgroundView];
    
    UIImageView *loginPwdB = [[UIImageView alloc] initWithFrame:CGRectMake(10,20, SCREEN_WIDTH-20, SCREEN_HEIGHT*0.07)];
    //loginPwdBG.image = [UIImage imageNamed:@"updatepassword_03"];
    loginPwdB.backgroundColor = [UIColor whiteColor];
    loginPwdB.layer.borderColor = [UIColor grayColor].CGColor;
    loginPwdB.layer.borderWidth = 0.5;
    loginPwdB.userInteractionEnabled = YES;
    [backgroundView addSubview:loginPwdB];
    
    
    nameTextField = [[UITextField alloc] initWithFrame:CGRectMake(10, 0 ,loginPwdB.frame.size.width-20 , SCREEN_HEIGHT*0.07)];
    nameTextField.tag = 1;
    nameTextField.placeholder = @"吴彦祖";
    nameTextField.font = [UIFont systemFontOfSize:14];
    //writePhoneNum.backgroundColor= [UIColor whiteColor];
    [loginPwdB addSubview:nameTextField];
    nameTextField.delegate = self;
    
    UIImageView *loginPwdB1 = [[UIImageView alloc] initWithFrame:CGRectMake(10,loginPwdB.bottom+10, SCREEN_WIDTH-20, SCREEN_HEIGHT*0.07)];
    //loginPwdBG.image = [UIImage imageNamed:@"updatepassword_03"];
    loginPwdB1.backgroundColor = [UIColor whiteColor];
    loginPwdB1.layer.borderColor = [UIColor grayColor].CGColor;
    loginPwdB1.layer.borderWidth = 0.5;
    loginPwdB1.userInteractionEnabled = YES;
    [backgroundView addSubview:loginPwdB1];
    
    
    mobileTextField = [[UITextField alloc] initWithFrame:CGRectMake(10, 0 ,loginPwdB1.frame.size.width-20 , SCREEN_HEIGHT*0.07)];
    mobileTextField.tag = 2;
    mobileTextField.placeholder = @"电话:156-0202-3652";
    mobileTextField.font = [UIFont systemFontOfSize:14];
    //writePhoneNum.backgroundColor= [UIColor whiteColor];
    [loginPwdB1 addSubview:mobileTextField];
    mobileTextField.delegate = self;
    
    UIImageView *loginPwdB2 = [[UIImageView alloc] initWithFrame:CGRectMake(10,loginPwdB1.bottom+10, SCREEN_WIDTH-20, SCREEN_HEIGHT*0.09)];
    //loginPwdBG.image = [UIImage imageNamed:@"updatepassword_03"];
    loginPwdB2.backgroundColor = [UIColor whiteColor];
    loginPwdB2.layer.borderColor = [UIColor grayColor].CGColor;
    loginPwdB2.layer.borderWidth = 0.5;
    loginPwdB2.userInteractionEnabled = YES;
    [backgroundView addSubview:loginPwdB2];
    
    
    addressTextView = [[UITextView alloc] initWithFrame:CGRectMake(5, 0 ,loginPwdB2.frame.size.width-20 , SCREEN_HEIGHT*0.09)];
    addressTextView.text = @"北京市朝阳区奥运村街道安外北苑40号院街道安外北苑40号院";
    addressTextView.font = [UIFont systemFontOfSize:14];
    //writePhoneNum.backgroundColor= [UIColor whiteColor];
    [loginPwdB2 addSubview:addressTextView];
    addressTextView.delegate = self;
    
    
    UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    leftBtn.frame = CGRectMake(20, loginPwdB2.bottom+40, SCREEN_WIDTH/2-30, SCREEN_WIDTH*0.11);
    [leftBtn setBackgroundImage:[UIImage imageNamed:@"修改信息_09"] forState:UIControlStateNormal];
    [leftBtn addTarget:self action:@selector(clickLeftBtn) forControlEvents:UIControlEventTouchUpInside];
    [backgroundView addSubview:leftBtn];
    
    
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    rightBtn.frame = CGRectMake(leftBtn.right+20, loginPwdB2.bottom+40, SCREEN_WIDTH/2-30, SCREEN_WIDTH*0.11);
    [rightBtn setBackgroundImage:[UIImage imageNamed:@"cancel"] forState:UIControlStateNormal];
    [rightBtn setBackgroundImage:[UIImage imageNamed:@"cancel1"] forState:UIControlStateHighlighted];
    [rightBtn addTarget:self action:@selector(clickRightBtn) forControlEvents:UIControlEventTouchUpInside];
    [backgroundView addSubview:rightBtn];
    
}
#pragma mark - ClickBtn
-(void)clickLeftBtn{
    
}
-(void)clickRightBtn{
    
}
@end
